<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/1/28
  Time: 18:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>下拉菜单</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/libs/bootstrap/css/bootstrap.min.css">
    <script src="${pageContext.request.contextPath}/libs/jquery/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/libs/bootstrap/js/bootstrap.js"></script>
</head>
<body>

<div class="container">

    <div class="row">

        <div class="col-sm-3">
            <div class="dropdown">
                <button type="button" id="dropdownMenu" class="btn dropdown-toggle" data-toggle="dropdown">
                    菜单
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
                    <li role="presentation">
                        <a role="menuitem" href="#">Java</a>
                    </li>
                    <li role="presentation">
                        <a role="menuitem" href="#">Web</a>
                    </li>
                    <li role="presentation" class="divider"></li>
                    <li role="presentation">
                        <a role="menuitem" href="#">Python</a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="col-sm-3">
            <%-- 对齐 --%>
            <div class="dropdown">
                <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
                    对齐菜单
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenu1">
                    <li role="presentation" class="dropdown-header">菜单标题</li>
                    <li role="presentation">
                        <a href="#" role="menuitem">右对齐Java</a>
                    </li>
                    <li role="presentation">
                        <a href="#" role="menuitem">右对齐Web</a>
                    </li>
                    <li role="presentation" class="divider"></li>
                    <li role="presentation">
                        <a href="#" role="menuitem">右对齐</a>
                    </li>
                </ul>
            </div>
        </div>

    </div>

</div>

</body>
</html>
